import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2022-11-16
 * Time: 17:04
 */
public class Factorial {
    public static int factorial(int n) {
        if (n == 1) {
            return n;
        }
        return n * factorial(--n);
    }
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        System.out.println(factorial(n));
    }
}
